<template>
	<view>
		<text>这是详情页面哦</text>
		<view><button @tap="myClick('你说')"type="primary">点击我触发事件</button></view>
		<view v-for="(item,index) in list" :key="index">
			<button type="primary" @tap="itemClick">{{item.a}}</button>
			{{showText()}}
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[{a:12},{a:13},{a:14}]
			};
		},
		onLoad(option) {
			console.log(option.id);
			console.log(option.name);
		},
		methods:{
			myClick:function(ev){
				console.log(ev);
				console.log(ev.target.dataset.name);
			},
			itemClick:function(ev){
				console.log(ev);
			},
			showText:function(){
				return 'methods里面的方法';
			}
		}
	}
</script>

<style lang="scss">

</style>
